<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <title>工具</title>

    <link rel="shortcut icon" href="assets/img/logo2x.png"/>
    <!-- Bootstrap core CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet"/>
    <!--external css-->
    <link rel="stylesheet" type="text/css" href="assets/font-awesome/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="assets/css/zabuto_calendar.css">
    <link rel="stylesheet" type="text/css" href="assets/js/gritter/css/jquery.gritter.css"/>
    <link rel="stylesheet" type="text/css" href="assets/lineicons/style.css">

    <!-- Custom styles for this template -->
    <link href="assets/css/style.css" rel="stylesheet">
    <link href="assets/css/style-responsive.css" rel="stylesheet">

    <script src="assets/js/chart-master/Chart.js"></script>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<section id="container">
    <!-- **********************************************************************************************************************************************************
    Header
    *********************************************************************************************************************************************************** -->
    <!--header start-->
    <header class="header black-bg" th:fragment="header">
        <div class="sidebar-toggle-box">
            <div class="fa fa-bars tooltips"></div>
        </div>
        <!--logo start-->
        <a href="index.html" class="logo"><b>医疗就诊系统</b></a>
        <!--logo end-->
        <div class="nav notify-row" id="top_menu">
            <!--  notification start -->
            <ul class="nav top-menu">
                <!-- settings start -->
                <li class="dropdown">
                    <a href="/records" th:if="${session.loginuser.role.user} == true ">
                        <i class="fa fa-list-alt"></i>
                        <!--数量-->
                        <!--<span >1</span>-->
                        <span class="badge bg-info" th:text="${session.regcount}"></span>
                    </a>
                </li>
                <li class="dropdown">
                    <a href="/clinic" th:if="${session.loginuser.role.doctor} == true ">
                        <i class="fa fa-stethoscope"></i>
                        <!--数量-->
                        <!--<span >1</span>-->
                        <span class="badge bg-theme" th:text="${session.aptcount}"></span>
                    </a>
                </li>
                <li class="dropdown">
                    <a href="/tasks" th:if="${session.loginuser.role.admin} == true ">
                        <i class="fa fa-tasks"></i>
                        <!--数量-->
                        <!--<span >1</span>-->
                        <span class="badge bg-theme" th:text="${session.aptcount}"></span>
                    </a>
                </li>
                <!-- settings end -->
            </ul>

        </div>
        <div class="top-menu">
            <ul class="nav pull-right top-menu">
                <li><a class="logout" href="/clogout">注销</a></li>
            </ul>
        </div>
    </header>
    <!--header end-->


    <!-- **********************************************************************************************************************************************************
        MAIN SIDEBAR MENU
        *********************************************************************************************************************************************************** -->
    <!--sidebar start-->
    <aside>
        <div id="sidebar" class="nav-collapse " th:fragment="sidebar">
            <!-- sidebar menu start-->
            <ul class="sidebar-menu" id="nav-accordion">

                <a href="/profile">
                    <p class="centered">
                        <img th:src="${session.loginuser.picurl}" class="img-circle" width="80">

                    </p>
                    <h5 class="centered">您好！ <span th:text="${session.loginuser.username}"></span></h5>
                </a>
                <li class="mt">
                    <a href="/index">
                        <i class="fa fa-2x fa-home"></i>
                        <span>首页</span>
                    </a>
                </li>

                <li class="sub-menu">
                    <a href="/profile">
                        <i class="fa fa-2x fa-user"></i>
                        <span>个人信息</span>
                    </a>
                </li>

                <li class="sub-menu">
                    <a href="/records">
                        <i class="fa fa-list-alt"></i>
                        <span>挂号记录</span>
                    </a>
                </li>

                <li class="sub-menu">
                    <a href="/authority">
                        <i class="fa fa-shield"></i>
                        <span>权限申请</span>
                    </a>
                </li>



                <li class="sub-menu" th:if="${session.loginuser.role.doctor} == true OR ${session.loginuser.role.admin} == true">
                    <a href="javascript:;">
                        <i class="fa fa-tasks"></i>
                        <span>我的任务</span>
                    </a>
                    <ul class="sub">
                        <!--<li><a href="/records" th:if="${session.loginuser.role.user} == true">我的记录</a></li>-->
                        <li><a href="/clinic" th:if="${session.loginuser.role.doctor} == true">医疗类</a></li>
                        <li><a href="/tasks" th:if="${session.loginuser.role.admin} == true">权限类</a></li>
                    </ul>
                </li>

                <li class="sub-menu" th:if="${session.loginuser.role.admin} == true">
                    <a href="javascript:;">
                        <i class="fa fa-medkit"></i>
                        <span>药品管理</span>
                    </a>
                    <ul class="sub">
                        <li><a href="/purchase">采购药品</a></li>
                        <li><a href="/medicine">库存维护</a></li>
                        <li><a href="/reqmd">取药申请</a></li>
                    </ul>
                </li>


                <li class="sub-menu" th:if="${session.loginuser.role.root} == true">
                    <a href="/users">
                        <i class="fa fa-users"></i>
                        <span>用户管理</span>
                    </a>
                </li>


            </ul>

            <!-- sidebar menu end-->
        </div>
    </aside>


    <!--**********************************************************************************************
    Footer
    **********************************************************************************************-->

    <!--footer start-->
    <footer class="site-footer">
        <div class="text-center">
            Copyright © 2018 David Bai
            <a href="#main-content" class="go-top">
                <i class="fa fa-angle-up"></i>
            </a>
        </div>
    </footer>
    <!--footer end-->
</section>


<!-- js placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/jquery-1.8.3.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script class="include" type="text/javascript" src="assets/js/jquery.dcjqaccordion.2.7.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="assets/js/jquery.sparkline.js"></script>

<!--common script for all pages-->
<script src="assets/js/common-scripts.js"></script>


</body>
</html>
